-
Notifications
You must be signed in to change notification settings - Fork 28
Refactor Kustomize deployment #26
Refactor Kustomize deployment #26
Conversation
The images names/tags are properly encoded in the base manifests, no need to override them through a Kustomization.
This deploys the controller (base layer) as well as the provisioner. End result remains the same.
Welcome @NicolasT! |
Hi @NicolasT. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Looks like I can't add this PR to a specific (GitHub) |
The original deployment manifests use two namespaces to deploy the stack, one for the controller ( |
For reference, here's a diff between a rendering of the manifest as found in the --- master 2020-12-17 18:34:13.137046719 +0000
+++ refactor-kustomize-deployment 2020-12-17 18:34:25.455373200 +0000
@@ -1,6 +1,11 @@
apiVersion: v1
kind: Namespace
metadata:
+ name: objectstorage-provisioner-ns
+---
+apiVersion: v1
+kind: Namespace
+metadata:
name: objectstorage-system
---
apiVersion: apiextensions.k8s.io/v1
@@ -554,12 +559,22 @@
apiVersion: v1
kind: ServiceAccount
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: objectstorage-controller-sa
namespace: objectstorage-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: objectstorage-controller
namespace: objectstorage-system
rules:
@@ -578,6 +593,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: objectstorage-controller-role
rules:
- apiGroups:
@@ -623,6 +643,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: objectstorage-controller
namespace: objectstorage-system
roleRef:
@@ -637,6 +662,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: system:objectstorage-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
@@ -703,13 +733,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
+ labels:
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
name: objectstorage-controller
namespace: objectstorage-system
spec:
replicas: 1
selector:
matchLabels:
- app: objectstorage-controller
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
strategy:
rollingUpdate:
maxSurge: 1
@@ -717,10 +754,12 @@
template:
metadata:
labels:
- app: objectstorage-controller
+ app.kubernetes.io/component: controller
+ app.kubernetes.io/name: container-object-storage-interface-controller
+ app.kubernetes.io/part-of: container-object-storage-interface
+ app.kubernetes.io/version: main
spec:
containers:
- image: quay.io/containerobjectstorage/objectstorage-controller:latest
- imagePullPolicy: IfNotPresent
name: objectstorage-controller
serviceAccountName: objectstorage-controller-sa |
This patch removes hard-coded namespaces from the `base` layer, then creates the `objectstorage-system` and `objectstorage-provisioner-ns` Namespaces in the `fullstack` overlay, and uses them accordingly. Closes: kubernetes-retired#22
/lgtm @wlan0 and @brahmaroutu thoughts on namespace changes? |
@tparikh: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Note current PR doesn't make any changes to namespaces being used (except for creating the one the sample provisioner wants to be deployed in, though one could argue that one should get its own Kustomize in its repo which we can then reference...). |
dbef78e
to
6d19b49
Compare
Yeah you’ve just removed the hard coded namespace. |
/lgtm |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: NicolasT, wlan0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First stab at some of the changes suggested in container-object-storage-interface/cosi-controller-manager#9:
base
layer and afullstack
layer on top of itIfNotPresent
imagePullPolicy
which one potentially doesn't want forlatest
images (we could patch this in adev
layer?)See: #23
See: #21
See: #11